package com.zhouyu.service;

import org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor;
import org.springframework.beans.factory.support.RootBeanDefinition;

public class StoneBeanPostProcessor implements MergedBeanDefinitionPostProcessor {

	@Override
	public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class<?> beanType,
												String beanName) {
		if (beanName.equals("userService")) {
			// 可以针对 UserService 对象，设置初始化方法等
			beanDefinition.setInitMethodName("aInit");
		}
	}
}
